
@extends('/layouts.app')
@section("content")
    <div class="container">
        <div class="row">
            <div class="col-sm-2">
                @include("layouts.aside")
            </div>
            <div class="col-sm-10">
                <table class="table  table-striped table-hover">
                    <tr class="info">
                        <th>id</th>
                        <th>标题</th>
                        <th>日期</th>
                        <th>编辑</th>
                    </tr>
                    @forelse($posts as $post)
                        <tr>
                            <td>{{$post->id}}</td>
                            <td>{{$post->title}}</td>
                            <td>{{$post->created_at}}</td>
                            <td>

                                <a href="/post/detail/{{$post->id}}">查看</a>
                            </td>
                        </tr>
                    @empty
                      <tr><td colspan="4">您还没有发布文章呢!!</td></tr>
                    @endforelse
                </table>

            </div>

        </div>

    </div>
@endsection




